﻿using System;
using System.Globalization;
using System.Threading;

namespace MobileLoader
{
    public class UserInterfaceCulture: IDisposable
    {
        private readonly CultureInfo _currentcultureInfo;

        public UserInterfaceCulture()
        {
            _currentcultureInfo = Thread.CurrentThread.CurrentCulture;
            Thread.CurrentThread.CurrentCulture = new CultureInfo("pt-PT");
        }

        public void Dispose()
        {
            Thread.CurrentThread.CurrentCulture = _currentcultureInfo;
            GC.Collect();
        }        
    }
}
